package com.itheima.HomeWork_day07;

import java.time.LocalDateTime;

/*
JDK8的时间日期类
 */
public class JDK8DateTest03 {

    public static void main(String[] args) {
        LocalDateTime of = LocalDateTime.of(2021, 02, 24, 20, 30, 00);

        //获取年
        int year=of.getYear();
        System.out.println(year);

        //获取月
        int month = of.getMonthValue();
        System.out.println(month);

        //获取日
        int day = of.getDayOfMonth();
        System.out.println(day);

        //获取时
        int hour = of.getHour();
        System.out.println(hour);

        //获取分
        int minute = of.getMinute();
        System.out.println(minute);

        //获取年中的天数
        int dayOfYear = of.getDayOfYear();
        System.out.println(dayOfYear);


    }


}
